package com.company.hrmadmin.modules.mapper;

import com.company.hrmadmin.modules.domain.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * @author Xmirror
 * @description 针对表【tb_department(部门)】的数据库操作Mapper
 * @createDate 2022-04-01 14:10:52
 * @Entity com.company.hrmadmin.modules.domain.Department
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     * 从顶级部门开始查询，一直查到最底层部门
     * 查询结果包含该部门本身
     *
     * @param id 部门ID
     * @return List 集合
     */
    List<Department> selectDepListById(Integer id);

    /**
     * 查询出所有顶级部门
     *
     * @return List
     */
    List<Department> selectTopDepList();

}




